#include "LifeHistoryPanel.h"
#include "AtAgePanel.h"
#include "EntryPanel.h"

LifeHistoryPanel::LifeHistoryPanel(wxWindow* parent)
                : wxPanel(parent, wxID_ANY)
{
  m_pVertBoxSizer   = new wxBoxSizer(wxVERTICAL);
  m_pMaturityAtAgePanel = new AtAgePanel(this, wxT(MATURITY_AT_AGE_STRING),
                                         DEFAULT_AT_AGE_PERC_LOW,
                                         DEFAULT_AT_AGE_PERC_HIGH,
                                         DEFAULT_AT_AGE_LOW,
                                         DEFAULT_AT_AGE_HIGH);
  m_pSelectivityAtAgePanel = new AtAgePanel(this, wxT(SELECTIVITY_AT_AGE_STRING),
                                         DEFAULT_AT_AGE_PERC_LOW,
                                         DEFAULT_AT_AGE_PERC_HIGH,
                                         DEFAULT_AT_AGE_LOW,
                                         DEFAULT_AT_AGE_HIGH);

  m_pNaturalMortalityPanel = new EntryPanel(this, wxT(LH_LABEL3), 0, true);
  m_pAlloAlphaPanel = new EntryPanel(this, wxT(LH_LABEL4), 0, true);
  m_pAlloBetaPanel = new EntryPanel(this, wxT(LH_LABEL5), 0, true);
  m_pAsympLengthPanel = new EntryPanel(this, wxT(LH_LABEL6), 0, true);
  m_pLengthStartAgePanel = new EntryPanel(this, wxT(LH_LABEL7), 0, true);
  m_pVonBkPanel = new EntryPanel(this, wxT(LH_LABEL8), 0, true);
  m_pStandardErrorLAPanel = new EntryPanel(this, wxT(LH_LABEL9), 0, true);


  m_pStaticBox = new wxStaticBox(this, wxID_ANY, wxT(NULL_STRING));
  m_pStaticBoxSizer = new wxStaticBoxSizer(m_pStaticBox, wxVERTICAL);
  m_pPanelLabel = new wxStaticText(this, wxID_ANY, wxT(LH_PANEL_LABEL));
  wxFont font = m_pPanelLabel->GetFont();
  font.SetPointSize(PANEL_LABEL_FONT_SIZE);
  font.SetWeight(wxFONTWEIGHT_BOLD);
  m_pPanelLabel->SetFont(font);
  m_pStaticBoxSizer->Add(m_pPanelLabel, wxSizerFlags().Center().Border(wxALL,BORDER_SIZE));

  m_pStaticBoxSizer->Add(m_pMaturityAtAgePanel, wxSizerFlags(1).Expand().Left().Border(wxALL,BORDER_SIZE));
  m_pStaticBoxSizer->Add(m_pSelectivityAtAgePanel, wxSizerFlags(1).Expand().Left().Border(wxALL,BORDER_SIZE));
  m_pStaticBoxSizer->Add(m_pNaturalMortalityPanel, wxSizerFlags(1).Expand().Left().Border(wxALL,BORDER_SIZE));
  m_pStaticBoxSizer->Add(m_pAlloAlphaPanel, wxSizerFlags(1).Expand().Left().Border(wxALL,BORDER_SIZE));
  m_pStaticBoxSizer->Add(m_pAlloBetaPanel, wxSizerFlags(1).Expand().Left().Border(wxALL,BORDER_SIZE));
  m_pStaticBoxSizer->Add(m_pAsympLengthPanel, wxSizerFlags(1).Expand().Left().Border(wxALL,BORDER_SIZE));
  m_pStaticBoxSizer->Add(m_pLengthStartAgePanel, wxSizerFlags(1).Expand().Left().Border(wxALL,BORDER_SIZE));
  m_pStaticBoxSizer->Add(m_pVonBkPanel, wxSizerFlags(1).Expand().Left().Border(wxALL,BORDER_SIZE));
  m_pStaticBoxSizer->Add(m_pStandardErrorLAPanel, wxSizerFlags(1).Expand().Left().Border(wxALL,BORDER_SIZE));

  m_pVertBoxSizer->Add(m_pStaticBoxSizer, wxSizerFlags(1).Expand().Left().Border(wxALL,BORDER_SIZE));
  SetSizerAndFit(m_pVertBoxSizer);
}

LifeHistoryPanel::~LifeHistoryPanel()
{
}

BEGIN_EVENT_TABLE ( LifeHistoryPanel, wxPanel)

END_EVENT_TABLE()
